# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo8_01
# Description:
# Author:       asus
# Date:         2019/3/14
#-------------------------------------------------------------------------------


# 创建一个类，利用这个类创建两个对象，并调用其中的方法

class Person:
    def setName(self,name):
        self.name = name

    def getName(self):
        return self.name

    def greet(self):
        print("Hello,I'm {name}.".format(name = self.name))

# 创建person1对象
person1 = Person()

person2 = Person()

person1.setName("Bill Gates")
person2.name = "Bill Clinton"
print(person1.getName())
person1.greet()
print(person2.name)
Person.greet(person2)
